# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=whipper
pkgver=0.9.0
pkgrel=0
pkgdesc="python CD-DA ripper preferring accuracy over speed"
url="https://github.com/whipper-team/whipper"
arch="all !armv7 !x86" # TODO tests fail on armv7 and x86, ref whipper issue #429
license="GPL-3.0-only"
depends="
	python3
	libcdio-paranoia
	cdrdao
	gobject-introspection
	py3-gobject3
	py3-musicbrainzngs
	py3-mutagen
	py3-requests
	py3-cdio
	py3-discid
	py3-ruamel.yaml
	flac
	sox
"
makedepends="python3-dev py3-wheel libsndfile-dev"
checkdepends="py3-setuptools_scm py3-twisted"
options="net"
source="$pkgname-$pkgver.tar.gz::https://github.com/whipper-team/whipper/archive/v$pkgver.tar.gz"

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION="$pkgver"

	python3 setup.py build
}

check() {
	PYTHONPATH="$(echo $PWD/build/lib.*)" python3 -m unittest discover
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir" --skip-build
}
sha512sums="49e66ad2c6e8450199a53a28bb71725704daac86ce2cbf68080d4dee1c2357cf8367ddb4735a07f2ffe612d84f016661e5b6f94efa9d5a7d6b8cf56ee32b0ae7  whipper-0.9.0.tar.gz"
